IDictionary.Item Property

Task Parallel System.Threading

Gets or sets the value associated with the specified key.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Private Property Item ( _
	key As Object _
) As Object Implements IDictionary.Item
C#
Object IDictionary.Item[
	Object key
] { get; set; }

Parameters

key
Type: System..::.Object
The key of the value to get or set.

Field Value

The value associated with the specified key, or a null reference (Nothing in Visual Basic) if key is not in the dictionary or key is of a type that is not assignable to the key type TKey of the ConcurrentDictionary<(Of <(TKey, TValue>)>).

Implements

IDictionary..::.Item[([(Object])])

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionkey is a null reference (Nothing in Visual Basic).
System..::.ArgumentException A value is being assigned, and key is of a type that is not assignable to the key type TKey of the ConcurrentDictionary<(Of <(TKey, TValue>)>). -or- A value is being assigned, and key is of a type that is not assignable to the value type TValue of the ConcurrentDictionary<(Of <(TKey, TValue>)>)

See Also